package com.kwum.pattern.StrategyPattern;


/**
 * Description: 上下文，作为引入算法的实体类
 * @author Kwum
 * @date 2017年9月13日 下午5:17:14
 * @version 1.0
 */

public class Context {
    
    private Arithmetic arithmetic;
    
    public Context(Arithmetic arithmetic){
        this.arithmetic = arithmetic;
    }
    
    public int execute(int num1, int num2){
        return arithmetic.doOperation(num1, num2);
    }
}
